package main

import (
    "fmt"

    "github.com/duke-git/lancet/v2/system"
)

func main() {

    res := system.GetOsEnv("JAVA_HOME")
    fmt.Println(res)

    fmt.Println("----------------------------")

    stdout, stderr, err := system.ExecCommand("ls")

    fmt.Println(stdout)
    fmt.Println(stderr)
    fmt.Println(err)

    fmt.Println("----------------------------")

    if system.IsLinux() {
        fmt.Println("OS is Linux")
    } else if system.IsWindows() {
        fmt.Println("OS is Windows")
    } else if system.IsMac() {
        fmt.Println("OS is Mac")
    } else {
        fmt.Println("Unknown OS")
    }
}
